package router

import (
	"github.com/gin-gonic/gin"
	"github.com/smash-llj/Nexa-server/ws"
)

func InitWebsocketRoutes() {
	//注册当前大模块到gfnRoutes里面
	RegisterRoute(func(rgPublic *gin.RouterGroup, tgAuth *gin.RouterGroup) {
		hub := ws.NewHub()
		handel := ws.NewHandel(hub)
		go hub.Run()
		tgAuth.GET("/ws/", handel.Connect)
	})
}
